extends Node2D

@export var done = false
var hurtful = preload("bite_hit.tscn")
@export var create_hurtful = false

func _ready():
	create_hurtful = false
	set_physics_process(true)
	
func _physics_process(delta):
	if (create_hurtful):
		$HurtSpot1.add_child(hurtful.instantiate())
		$HurtSpot2.add_child(hurtful.instantiate())
	elif (done):
		$Timer.start()
		done = false

func _on_Timer_timeout():
	queue_free()
